瀏覽代碼

Fix message when reacting to other peoples stories

Tulir Asokan 3 年之前
父節點
當前提交
ed8da38b77
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      mautrix_instagram/portal.py

+ 6 - 1
mautrix_instagram/portal.py

@@ -944,7 +944,12 @@ class Portal(DBPortal, BasePortal):
                 user_link = f'<a href="https://www.instagram.com/{username}/">@{username}</a>'
                 prefix_html = f"Sent {user_link}'s story"
         elif item.reel_share.type == ReelShareType.REACTION:
-            prefix = "Reacted to your story"
+            if item.reel_share.reel_owner_id == source.igpk:
+                prefix = "Reacted to your story"
+            elif item.user_id == source.igpk:
+                prefix = "You reacted to their story"
+            else:
+                prefix = "Reacted to a story"
         elif item.reel_share.type == ReelShareType.MENTION:
             if item.reel_share.mentioned_user_id == source.igpk:
                 prefix = "Mentioned you in their story"